package com.zl.basis.screen;

import android.os.Parcel;
import android.os.Parcelable;

public class CommonSize implements Parcelable {
    private int mWidth;
    private int mHeight;

    public CommonSize() {
    }

    public CommonSize(int mWidth, int mHeight) {
        this.mWidth = mWidth;
        this.mHeight = mHeight;
    }

    public int getWidth() {
        return mWidth;
    }

    public void setWidth(int mWidth) {
        this.mWidth = mWidth;
    }

    public int getHeight() {
        return mHeight;
    }

    public void setHeight(int mHeight) {
        this.mHeight = mHeight;
    }

    @Override
    public String toString() {
        return "CommonSize{" +
                "mWidth=" + mWidth +
                ", mHeight=" + mHeight +
                '}';
    }


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.mWidth);
        dest.writeInt(this.mHeight);
    }

    protected CommonSize(Parcel in) {
        this.mWidth = in.readInt();
        this.mHeight = in.readInt();
    }

    public static final Creator<CommonSize> CREATOR = new Creator<CommonSize>() {
        @Override
        public CommonSize createFromParcel(Parcel source) {
            return new CommonSize(source);
        }

        @Override
        public CommonSize[] newArray(int size) {
            return new CommonSize[size];
        }
    };
}
